1. Field of the Invention
The present invention is directed to the storage of resources, such as images, bitmaps and sound files, in environments with constrained memory resources, such as embedded devices. The invention provides a means for accessing such resources during runtime where the resources are stored in read-only memory (ROM).
2. Description of the Related Art
Embedded devices, such as cellular telephones, pagers and PDAs (personal digital assistants), typically include complex user interfaces, aural signals and other features to perform the consumer function(s) for which the devices were designed.
The necessary resources are usually in the form of pre-constructed data files, containing bitmaps, fonts or sound recordings. The program accesses the data in one or more resource files to render the user interface on the device display or produce the sound from the device audio system.
The problem is how to store resources such as images, bitmaps, sound files, etc., and access them from running programs, such as Java(trademark) 1 applications. On a desktop, the simple approach is to use a flash file system and treat these resources just like normal files which are copied to random access memory (RAM) when accessed by the running program.
1Javva is a trademark of Sun Microsystems, Inc. 
However, this approach is not appropriate for embedded systems for two reasons. First, complex bitmap images can be very largexe2x80x94sometimes tens of thousands of bytes in length. Copying these to RAM for rendering on a display greatly increases the consumption of memory. Embedded devices typically have memory of only 1 to 4 megabytes, so an increase in the use of RAM to access resources, particularly to reproduce large bitmap images, impacts the number and complexity of applications that can be stored and run on the device.
Secondly, many embedded systems have only a thin realtime operating system (RTOS), or none at all. Often no file system is included.
Therefore, it is an object of the present invention to provide a means by which resource data can be stored in ROM without the use of a file system, and accessed in ROM storage from a running program.
It is also an object of the invention to provide portability, so that an application used in a less constrained memory environment, such as a desktop operating system, can be used on an embedded platform without changing the application code.
According to these and other objects, the present invention provides a system for processing resource data directly from a location in read-only memory which includes at least one logical table containing a key for a program call for a resource, and associating the key with a value identifying the location in read-only memory of the resource data. The system also includes a mechanism for redirecting calls to the resource data to the at least one logical table. Preferably, the value is a pointer to the location in read-only memory of the resource data and the key is a string.
The present invention also provides a method for processing resource data directly from a location in read-only memory. On start-up of the system, an array of key-value pairs is generated in which the key in a pair is associated with a named resource and the corresponding value in the pair is information for accessing the resource data at the location in read-only memory. On start-up of a program in said system, a global switch is engaged which directs program calls for resources to the array.